<?php
class Company_model extends CI_Model {
	function __construct()
	{
		parent::__construct();
	}
	
	function get_company_by_id($id)
	{
		$this->db->select('company_id,name,location,phone,email,industry,type_id,description');
		$this->db->from('company');
		$this->db->where('company_id',$id);
		
		$data = array();
		$q = $this->db->get();
		if ($q->num_rows() > 0) {
			$data = $q->result();
			
			return $data[0];
		}
		return "No record found: ". $id;
	}
}
